package vip.xiaonuo.h5.royalty.modular.station.controller;

import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;
import vip.xiaonuo.common.pojo.CommonResult;
import vip.xiaonuo.h5.royalty.modular.station.vo.SimpleStationPage;
import vip.xiaonuo.h5.royalty.modular.station.vo.FullStationListPage;
import vip.xiaonuo.h5.royalty.modular.station.vo.RankStationPage;
import vip.xiaonuo.h5.royalty.modular.station.param.FullStationListParam;
import vip.xiaonuo.h5.royalty.modular.station.param.RankStationListParam;
import vip.xiaonuo.h5.royalty.modular.station.service.StationService;

/**
 * 站点控制器
 */
@RestController
@RequestMapping("/h5/station")
public class StationController {

    @Resource
    private StationService stationService;

    /**
     * 获取简单站点列表
     * @return 简单站点列表
     */
    @GetMapping("/getSimpleStationList")
    public CommonResult<SimpleStationPage> getSimpleStationList() {
        SimpleStationPage result = stationService.getSimpleStationList();
        return CommonResult.data(result);
    }

    /**
     * 获取全面站点列表
     * @param param 查询参数
     * @return 全面站点列表
     */
    @PostMapping("/getFullStationList")
    public CommonResult<FullStationListPage> getFullStationList(@RequestBody FullStationListParam param) {
        FullStationListPage result = stationService.getFullStationList(param);
        return CommonResult.data(result);
    }

    /**
     * 获取场站排名列表
     * @param param 排名查询参数
     * @return 场站排名列表
     */
    @PostMapping("/getRankStationList")
    public CommonResult<RankStationPage> getRankStationList(@RequestBody RankStationListParam param) {
        RankStationPage result = stationService.getRankStationList(param);
        return CommonResult.data(result);
    }

}
